package com.yxt.common.exception;

/***
 * 错误码和错误信息定义类
 * 前五个代表端口号
 * 后三位代表业务号
 *
 */
public enum BizCodeEnume {

    //验证码超时
    CAPTCHA_EXPIRE("10001000","user.jcaptcha.expire"),
    //验证码错误 user.login.success
    CAPTCHA_ERROR("10001001","user.jcaptcha.error"),
    USERNAME_PASSWORD_ERROR("10001002","user.namepassword.error"),
    LOGIN_SUCCESS("10001003","user.login.success"),
    TOKEN_ERROR("10000000","gateway.token.error"),
    TOKEN_EMPTY("10000001","gateway.token.empty"),
    AUTH_ERROR("10000001","gateway.auth.error"),

    UNKNOW_EXCEPTION("10000", "系统未知异常"),
    VAILD_EXCEPTION("10001111", "参数格式校验失败");
//    VAILD_SMS_CODE_EXCEPTION(10002, "发送验证码频率过快，稍后再试！"),
//    TO_MANY_REQUEST(10003, "请求流量过大"),
//    PRODUCT_UP_TO_ES_EXCETION(11000, "商品上架给es索引数据时异常"),
//    USER_EXIST_EXCEPTION(15001, "用户已存在"),
//    PHONE_EXIST_EXCEPTION(15002, "手机号已存在"),
//    LOGINACCT_PASSSWORD_INVAILD_EXCEPTION(15003, "账号或密码错误"),
//    NO_STOCK_EXCEPTION(21000, "商品库存不足");


    private String code;
    private String msg;
    BizCodeEnume(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
